3.4.7 \(\int \frac {a+b \log (c (d+e x)^n)}{(f+\frac {g}{x})^2 x^2} \, dx\) [307]

Optimal. Leaf size=74 \[ -\frac {b e n \log (d+e x)}{f (d f-e g)}-\frac {a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac {b e n \log (g+f x)}{f (d f-e g)} \]

[Out]

-b*e*n*ln(e*x+d)/f/(d*f-e*g)+(-a-b*ln(c*(e*x+d)^n))/f/(f*x+g)+b*e*n*ln(f*x+g)/f/(d*f-e*g)

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2459, 2442, 36, 31} \begin {gather*} -\frac {a+b \log \left (c (d+e x)^n\right )}{f (f x+g)}-\frac {b e n \log (d+e x)}{f (d f-e g)}+\frac {b e n \log (f x+g)}{f (d f-e g)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d + e*x)^n])/((f + g/x)^2*x^2),x]

[Out]

-((b*e*n*Log[d + e*x])/(f*(d*f - e*g))) - (a + b*Log[c*(d + e*x)^n])/(f*(g + f*x)) + (b*e*n*Log[g + f*x])/(f*(
d*f - e*g))

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2459

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)/(x_))^(q_.)*(x_)^(m_.), x_Symbol]
 :> Int[(g + f*x)^q*(a + b*Log[c*(d + e*x)^n])^p, x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q}, x] && EqQ[m,
q] && IntegerQ[q]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac {g}{x}\right )^2 x^2} \, dx &=\int \frac {a+b \log \left (c (d+e x)^n\right )}{(g+f x)^2} \, dx\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac {(b e n) \int \frac {1}{(d+e x) (g+f x)} \, dx}{f}\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac {(b e n) \int \frac {1}{g+f x} \, dx}{d f-e g}-\frac {\left (b e^2 n\right ) \int \frac {1}{d+e x} \, dx}{f (d f-e g)}\\ &=-\frac {b e n \log (d+e x)}{f (d f-e g)}-\frac {a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac {b e n \log (g+f x)}{f (d f-e g)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 57, normalized size = 0.77 \begin {gather*} \frac {-\frac {a+b \log \left (c (d+e x)^n\right )}{g+f x}+\frac {b e n (\log (d+e x)-\log (g+f x))}{-d f+e g}}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d + e*x)^n])/((f + g/x)^2*x^2),x]

[Out]

(-((a + b*Log[c*(d + e*x)^n])/(g + f*x)) + (b*e*n*(Log[d + e*x] - Log[g + f*x]))/(-(d*f) + e*g))/f

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.31, size = 354, normalized size = 4.78

method result size
risch \(-\frac {b \ln \left (\left (e x +d \right )^{n}\right )}{f \left (f x +g \right )}-\frac {-i \pi b e g \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b d f \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b e g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )-i \pi b d f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )-i \pi b e g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-i \pi b d f \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}+i \pi b d f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b e g \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}-2 \ln \left (-f x -g \right ) b e f n x +2 \ln \left (e x +d \right ) b e f n x -2 \ln \left (-f x -g \right ) b e g n +2 \ln \left (e x +d \right ) b e g n +2 \ln \left (c \right ) b d f -2 \ln \left (c \right ) b e g +2 a d f -2 a e g}{2 \left (f x +g \right ) f \left (d f -e g \right )}\) \(354\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(e*x+d)^n))/(f+g/x)^2/x^2,x,method=_RETURNVERBOSE)

[Out]

-b/f/(f*x+g)*ln((e*x+d)^n)-1/2*(-I*Pi*b*e*g*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2+I*Pi*b*d*f*csgn(I*(e*x+d)^
n)*csgn(I*c*(e*x+d)^n)^2+I*Pi*b*e*g*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)-I*Pi*b*d*f*csgn(I*c)*csgn(
I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)-I*Pi*b*e*g*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2-I*Pi*b*d*f*csgn(I*c*(e*x+d)^n)^3+I
*Pi*b*d*f*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2+I*Pi*b*e*g*csgn(I*c*(e*x+d)^n)^3-2*ln(-f*x-g)*b*e*f*n*x+2*ln(e*x+d)*
b*e*f*n*x-2*ln(-f*x-g)*b*e*g*n+2*ln(e*x+d)*b*e*g*n+2*ln(c)*b*d*f-2*ln(c)*b*e*g+2*a*d*f-2*a*e*g)/(f*x+g)/f/(d*f
-e*g)

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 90, normalized size = 1.22 \begin {gather*} b n {\left (\frac {\log \left (f x + g\right )}{d f^{2} - f g e} - \frac {\log \left (x e + d\right )}{d f^{2} - f g e}\right )} e - \frac {b \log \left ({\left (x e + d\right )}^{n} c\right )}{f^{2} x + f g} - \frac {a}{f^{2} x + f g} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(f+g/x)^2/x^2,x, algorithm="maxima")

[Out]

b*n*(log(f*x + g)/(d*f^2 - f*g*e) - log(x*e + d)/(d*f^2 - f*g*e))*e - b*log((x*e + d)^n*c)/(f^2*x + f*g) - a/(
f^2*x + f*g)

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 99, normalized size = 1.34 \begin {gather*} -\frac {a d f - a g e - {\left (b f n x + b g n\right )} e \log \left (f x + g\right ) + {\left (b f n x e + b d f n\right )} \log \left (x e + d\right ) + {\left (b d f - b g e\right )} \log \left (c\right )}{d f^{3} x + d f^{2} g - {\left (f^{2} g x + f g^{2}\right )} e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(f+g/x)^2/x^2,x, algorithm="fricas")

[Out]

-(a*d*f - a*g*e - (b*f*n*x + b*g*n)*e*log(f*x + g) + (b*f*n*x*e + b*d*f*n)*log(x*e + d) + (b*d*f - b*g*e)*log(
c))/(d*f^3*x + d*f^2*g - (f^2*g*x + f*g^2)*e)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(e*x+d)**n))/(f+g/x)**2/x**2,x)

[Out]

Exception raised: NotImplementedError >> no valid subset found

________________________________________________________________________________________

Giac [A]
time = 6.01, size = 111, normalized size = 1.50 \begin {gather*} \frac {b f n x e \log \left (f x + g\right ) - b f n x e \log \left (x e + d\right ) + b g n e \log \left (f x + g\right ) - b d f n \log \left (x e + d\right ) - b d f \log \left (c\right ) + b g e \log \left (c\right ) - a d f + a g e}{d f^{3} x - f^{2} g x e + d f^{2} g - f g^{2} e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(f+g/x)^2/x^2,x, algorithm="giac")

[Out]

(b*f*n*x*e*log(f*x + g) - b*f*n*x*e*log(x*e + d) + b*g*n*e*log(f*x + g) - b*d*f*n*log(x*e + d) - b*d*f*log(c)
+ b*g*e*log(c) - a*d*f + a*g*e)/(d*f^3*x - f^2*g*x*e + d*f^2*g - f*g^2*e)

________________________________________________________________________________________

Mupad [B]
time = 0.90, size = 84, normalized size = 1.14 \begin {gather*} -\frac {a}{x\,f^2+g\,f}-\frac {b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}{f\,\left (g+f\,x\right )}+\frac {b\,e\,n\,\mathrm {atan}\left (\frac {e\,g\,2{}\mathrm {i}+e\,f\,x\,2{}\mathrm {i}}{d\,f-e\,g}+1{}\mathrm {i}\right )\,2{}\mathrm {i}}{f\,\left (d\,f-e\,g\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*(d + e*x)^n))/(x^2*(f + g/x)^2),x)

[Out]

(b*e*n*atan((e*g*2i + e*f*x*2i)/(d*f - e*g) + 1i)*2i)/(f*(d*f - e*g)) - (b*log(c*(d + e*x)^n))/(f*(g + f*x)) -
 a/(f*g + f^2*x)

________________________________________________________________________________________